frame: Fix copy&paste bug in shadow-type handling
authorTimm Bäder <mail@baedert.org>
Fri, 5 May 2017 09:51:06 +0000 (11:51 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:12 +0000 (21:27 -0400)
If the given shadow_type is none NONE, we have to remove the .flat style
class of course, not add it.

gtk/gtkframe.c

index 28c12a5d0cea80d3d44915cb49785e8829d354e9..2779900114b281b1fecbd1cb6ed2174d6bb981ea 100644 (file)
@@ -586,8 +586,8 @@ gtk_frame_set_shadow_type (GtkFrame      *frame,
         gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
                                      GTK_STYLE_CLASS_FLAT);
       else
-        gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
-                                     GTK_STYLE_CLASS_FLAT);
+        gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (frame)),
+                                        GTK_STYLE_CLASS_FLAT);
 
       g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_SHADOW_TYPE]);
     }